
#ifndef	__SINK_STORAGE_HPP_2010__
#define	__SINK_STORAGE_HPP_2010__

#include	<map>
#include	<string>

class	ISinkStorage
{

public	:
	virtual	~ISinkStorage () {}
	
	virtual	int		open ( void ) = 0;
	virtual	int		close ( void ) = 0;

	virtual	int		write ( unsigned iType, const void* pvData, unsigned iDataSize ) = 0;

	virtual	int		switchStorage ( bool bForce = false ) = 0;

public	:
	
	static	int		mkpdir ( const char* pszPath );
	
	static	const char*	getDateString ( void );
	static	const char*	getDateTimeString ( void );
	static	const char*	getCompactDateString ( void );
	static	const char*	getCompactDateTimeString ( void );

	static	const char*	date( const char* pszFormat, int iFlags = 0 );

	static	int		getMinorSerial( void );
	
    static  int     gz_compress( const char* pszFileInput, const char* pszGZFileOutput );

};	/* class Storage */


#endif	/* __SINK_STORAGE_HPP_2010__ */
